import React, { FC, useState } from "react"

const StateDemo1: FC = () => {
  const [count, setCount] = useState(0)

  const change = () => {
    setCount((count) => count + 1)
    setCount((count) => count + 1)
    setCount((count) => count + 1)
  }
  return (
    <div className="stateDemo">
      <button onClick={change}>add {count}</button>
    </div>
  )
}

export default StateDemo1
